package com.acsior.hibernate.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.acsior.dac.impl.hibernate.vo.GeneratorKey;
import com.acsior.dac.impl.hibernate.vo.HibernatePersistantIntegerIdVO;

/**
 * BankAccount entity. @author MyEclipse Persistence Tools <b><i>powered by
 * Belev</i></b>
 */
@Entity
@Table(name = "bank_accounts")
@GeneratorKey(tableName = "bank_accounts")
public class BankAccountVO extends HibernatePersistantIntegerIdVO {

	private static final long serialVersionUID = 6123651633541849914L;

	@Column(name = "account_holder", nullable = false, length = 100)
	private String accountHolder;

	@Column(name = "bank", nullable = false, length = 50)
	private String bank;

	@Column(name = "bank_branch", length = 100)
	private String bankBranch;

	@Column(name = "bank_code", length = 10)
	private String bankCode;

	@Column(name = "bic", nullable = false, length = 10)
	private String bic;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "customer_id", nullable = false)
	private CustomerVO customer;

	@Column(name = "iban", nullable = false, length = 30)
	private String iban;

	/** default constructor */
	public BankAccountVO() {
		super();
	}

	/** @return the accountHolder */
	public String getAccountHolder() {
		return this.accountHolder;
	}

	/** @return the bank */
	public String getBank() {
		return this.bank;
	}

	/** @return the bankBranch */
	public String getBankBranch() {
		return this.bankBranch;
	}

	/** @return the bankCode */
	public String getBankCode() {
		return this.bankCode;
	}

	/** @return the bic */
	public String getBic() {
		return this.bic;
	}

	/** @return the customer */
	public CustomerVO getCustomer() {
		return this.customer;
	}

	/** @return the iban */
	public String getIban() {
		return this.iban;
	}

	/**
	 * @param accountHolder
	 *            the accountHolder to set
	 */
	public void setAccountHolder(String accountHolder) {
		this.accountHolder = accountHolder;
	}

	/**
	 * @param bank
	 *            the bank to set
	 */
	public void setBank(String bank) {
		this.bank = bank;
	}

	/**
	 * @param bankBranch
	 *            the bankBranch to set
	 */
	public void setBankBranch(String bankBranch) {
		this.bankBranch = bankBranch;
	}

	/**
	 * @param bankCode
	 *            the bankCode to set
	 */
	public void setBankCode(String bankCode) {
		this.bankCode = bankCode;
	}

	/**
	 * @param bic
	 *            the bic to set
	 */
	public void setBic(String bic) {
		this.bic = bic;
	}

	/**
	 * @param customer
	 *            the customer to set
	 */
	public void setCustomer(CustomerVO customer) {
		this.customer = customer;
	}

	/**
	 * @param iban
	 *            the iban to set
	 */
	public void setIban(String iban) {
		this.iban = iban;
	}

}